
import java.util.Random;
import java.util.Scanner;

public class Main {
 /*   public static void main5(String[] args) {
        int i = 1;
        int count = 0;
        for (i = 1; i <= 100; i++) {
            if (i % 10 == 9) {
                count++;
            }
            if (i / 10 == 9) {
                count++;
            }
        }
        System.out.println(count);
    }

    public static void main9(String[] args) {
        int year = 0;
        for (year = 1000; year <= 2000; year += 2) {
            if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
                System.out.println(year);
            }
        }
    }

    public static void main90(String[] args) {
        int i = 1;
        for (i = 1; i < 100; i += 2) {
            int j = 2;
            for (; j <= Math.sqrt(i); j += 2) {
                if (i % j == 0) {
                    System.out.println("不是素数");
                    break;
                }
            }
            if (i > Math.sqrt(i)) {
                System.out.println(i);
            }
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int num = sc.nextInt();

        int i = 1;

        for (i = 2; i < num; i += 2) {
            if (num % i == 0) {
                System.out.println("不是素数!");
                break;
            }
        }
        if (i == num) {
            System.out.println(num + "是素数");
        }
    }

    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入你的年龄");
        int age = sc.nextInt();
        if (age < 18) {
            System.out.println("少年你是" + age);
        } else if (age >= 19 && age <= 28) {
            System.out.println(age + "青年");
        } else if (age >= 29 && age <= 55) {
            System.out.println("中年" + age);
        } else {
            System.out.println(age + "老年");
        }
    }


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();

        int b = sc.nextInt();
        int c = a % b;
        while (c != 0) {
            a = b;
            b = c;
            c = a % b;
        }
        System.out.println(b);
    }


    public static void main(String[] args) {
        double sum = 0;
        int flg = 1;
        for (int i = 1; i <= 100; i++) {
            sum += 1.0 / i * flg;
            flg = -flg;
        }
        System.out.println(sum);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Random r = new Random();
        int number = r.nextInt(100) + 1;
        System.out.println(number);
        while (true) {
            System.out.println("请输入你要猜的数字");
            int num = sc.nextInt();
            if (num < number) {
                System.out.println(num + "猜小了");

            } else if (number < num) {
                System.out.println(num + "猜大了");

            } else {
                System.out.println("猜中了");
                break;
            }
        }
    }


    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        int count = 3;
        while (count != 0) {
            System.out.println("请输入你的密码,你还有" + count + "次机会:");
            String password = sc.nextLine();
            if (password.equals("1234")) {
                System.out.println("登陆成功");
                break;
            } else {
                System.out.println("密码错误");
                count--;
            }

        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(j + "*" + i + " = " + i * j + " ");
            }
            System.out.println();
        }
    }

    public static void main(String[] args) {
        int i = 1;
        double sum = 0;
        int flg = 1;
        for (int n = 1; n <= 100; n++) {
            sum += 1.0 * flg / n;
            flg = -flg;
        }
        System.out.println(sum);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第一个数字");
        int num1 = sc.nextInt();
        System.out.println("请输入第二个数字");
        int num2 = sc.nextInt();
        if (num2 > num1) {
            int temp = 0;
            temp = num1;
            num1 = num2;
            num2 = temp;
        }
        int c = num1 % num2;
        while (c != 0) {
            num1 = num2;
            num2 = c;
            c = num1 % num2;
        }
        System.out.println(num2);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入");
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            int count = 0;
            int flg = i;
            while (flg != 0) {
                count++;
                flg /= 10;
            }
            int sum = 0;
            flg = i;
            while (flg != 0) {
                sum += Math.pow(flg % 10, count);
                flg /= 10;
            }
            if (sum == i) {
                System.out.println(i);
            }
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个数");
        int n = sc.nextInt();
        int count = 0;
        while (n != 0) {
            count++;
            n = n & (n - 1);
        }
        System.out.println(count);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 3;
        while (count != 0) {
            System.out.println("请输入密码,你还剩" + count + "次机会");
            String password = sc.nextLine();
            if (password.equals("1234")) {
                System.out.println("登陆成功");
                break;
            } else {
                System.out.println("密码错误");
                count--;
            }
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个数字");
        while (sc.hasNextInt()) {
            int number = sc.nextInt();
            while (number != 0) {
                System.out.println(number % 10 + " ");
                number /= 10;
            }
        }
    }


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int n = sc.nextInt();
            for (int i = 1; i <= n; i++) {
                for (int j = 1; j <= i; j++) {
                    System.out.print(+j + "*" + i + " = " + i * j + " ");
                }
                System.out.println();
            }
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 31; i >= 0; i -= 2) {
            System.out.print(((n >>> i) & 1) + " ");
        }
        System.out.println();
        for (int i = 30; i >= 0; i -= 2) {
            System.out.print(((n >>> i) & 1) + " ");
        }
    }

  */
 public static void main(String[] args) {

 }
}

